﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Provider;
using System.Web.Configuration;
using System.Web;
using bookMaster.AssetSystem.Entities;
using bookMaster.AssetSystem.Data;
using bookMaster.AssetSystem.Data.Bases;

#endregion

namespace bookMaster.AssetSystem.Data
{
	/// <summary>
	/// This class represents the Data source repository and gives access to all the underlying providers.
	/// </summary>
	[CLSCompliant(true)]
	public sealed class DataRepository 
	{
		private static volatile NetTiersProvider _provider = null;
        private static volatile NetTiersProviderCollection _providers = null;
		private static volatile NetTiersServiceSection _section = null;
		private static volatile Configuration _config = null;
        
        private static object SyncRoot = new object();
				
		private DataRepository()
		{
		}
		
		#region Public LoadProvider
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        public static void LoadProvider(NetTiersProvider provider)
        {
			LoadProvider(provider, false);
        }
		
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        /// <param name="setAsDefault">ability to set any valid provider as the default provider for the DataRepository.</param>
		public static void LoadProvider(NetTiersProvider provider, bool setAsDefault)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (_providers == null)
			{
				lock(SyncRoot)
				{
            		if (_providers == null)
						_providers = new NetTiersProviderCollection();
				}
			}
			
            if (_providers[provider.Name] == null)
            {
                lock (_providers.SyncRoot)
                {
                    _providers.Add(provider);
                }
            }

            if (_provider == null || setAsDefault)
            {
                lock (SyncRoot)
                {
                    if(_provider == null || setAsDefault)
                         _provider = provider;
                }
            }
        }
		#endregion 
		
		///<summary>
		/// Configuration based provider loading, will load the providers on first call.
		///</summary>
		private static void LoadProviders()
        {
            // Avoid claiming lock if providers are already loaded
            if (_provider == null)
            {
                lock (SyncRoot)
                {
                    // Do this again to make sure _provider is still null
                    if (_provider == null)
                    {
                        // Load registered providers and point _provider to the default provider
                        _providers = new NetTiersProviderCollection();

                        ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
						_provider = _providers[NetTiersSection.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException("Unable to load default NetTiersProvider");
                        }
                    }
                }
            }
        }

		/// <summary>
        /// Gets the provider.
        /// </summary>
        /// <value>The provider.</value>
        public static NetTiersProvider Provider
        {
            get { LoadProviders(); return _provider; }
        }

		/// <summary>
        /// Gets the provider collection.
        /// </summary>
        /// <value>The providers.</value>
        public static NetTiersProviderCollection Providers
        {
            get { LoadProviders(); return _providers; }
        }
		
		/// <summary>
		/// Creates a new <c cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public TransactionManager CreateTransaction()
		{
			return _provider.CreateTransaction();
		}

		#region Configuration

		/// <summary>
		/// Gets a reference to the configured NetTiersServiceSection object.
		/// </summary>
		public static NetTiersServiceSection NetTiersSection
		{
			get
			{
				// Try to get a reference to the default <netTiersService> section
				_section = WebConfigurationManager.GetSection("netTiersService") as NetTiersServiceSection;

				if ( _section == null )
				{
					// otherwise look for section based on the assembly name
					_section = WebConfigurationManager.GetSection("bookMaster.AssetSystem.Data") as NetTiersServiceSection;
				}

				#region Design-Time Support

				if ( _section == null )
				{
					// lastly, try to find the specific NetTiersServiceSection for this assembly
					foreach ( ConfigurationSection temp in Configuration.Sections )
					{
						if ( temp is NetTiersServiceSection )
						{
							_section = temp as NetTiersServiceSection;
							break;
						}
					}
				}

				#endregion Design-Time Support
				
				if ( _section == null )
				{
					throw new ProviderException("Unable to load NetTiersServiceSection");
				}

				return _section;
			}
		}

		#region Design-Time Support

		/// <summary>
		/// Gets a reference to the application configuration object.
		/// </summary>
		public static Configuration Configuration
		{
			get
			{
				if ( _config == null )
				{
					// load specific config file
					if ( HttpContext.Current != null )
					{
						_config = WebConfigurationManager.OpenWebConfiguration("~");
					}
					else
					{
						String configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.Replace(".config", "").Replace(".temp", "");

						// check for design mode
						if ( configFile.ToLower().Contains("devenv.exe") )
						{
							_config = GetDesignTimeConfig();
						}
						else
						{
							_config = ConfigurationManager.OpenExeConfiguration(configFile);
						}
					}
				}

				return _config;
			}
		}

		private static Configuration GetDesignTimeConfig()
		{
			ExeConfigurationFileMap configMap = null;
			Configuration config = null;
			String path = null;

			// Get an instance of the currently running Visual Studio IDE.
			EnvDTE80.DTE2 dte = (EnvDTE80.DTE2) System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0");
			
			if ( dte != null )
			{
				dte.SuppressUI = true;

				EnvDTE.ProjectItem item = dte.Solution.FindProjectItem("web.config");
				if ( item != null )
				{
					if (!item.ContainingProject.FullName.ToLower().StartsWith("http:"))
               {
                  System.IO.FileInfo info = new System.IO.FileInfo(item.ContainingProject.FullName);
                  path = String.Format("{0}\\{1}", info.Directory.FullName, item.Name);
                  configMap = new ExeConfigurationFileMap();
                  configMap.ExeConfigFilename = path;
               }
               else
               {
                  configMap = new ExeConfigurationFileMap();
                  configMap.ExeConfigFilename = item.get_FileNames(0);
               }}

				/*
				Array projects = (Array) dte2.ActiveSolutionProjects;
				EnvDTE.Project project = (EnvDTE.Project) projects.GetValue(0);
				System.IO.FileInfo info;

				foreach ( EnvDTE.ProjectItem item in project.ProjectItems )
				{
					if ( String.Compare(item.Name, "web.config", true) == 0 )
					{
						info = new System.IO.FileInfo(project.FullName);
						path = String.Format("{0}\\{1}", info.Directory.FullName, item.Name);
						configMap = new ExeConfigurationFileMap();
						configMap.ExeConfigFilename = path;
						break;
					}
				}
				*/
			}

			config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
			return config;
		}

		#endregion Design-Time Support

		#endregion Configuration

		#region Connections

		/// <summary>
		/// Gets a reference to the ConnectionStringSettings collection.
		/// </summary>
		public static ConnectionStringSettingsCollection ConnectionStrings
		{
			get
			{
				// use default ConnectionStrings if _section has already been discovered
				if ( _config == null && _section != null )
				{
					return WebConfigurationManager.ConnectionStrings;
				}
				
				return Configuration.ConnectionStrings.ConnectionStrings;
			}
		}

		// dictionary of connection providers
		private static Dictionary<String, ConnectionProvider> _connections;

		/// <summary>
		/// Gets the dictionary of connection providers.
		/// </summary>
		public static Dictionary<String, ConnectionProvider> Connections
		{
			get
			{
				if ( _connections == null )
				{
					lock (SyncRoot)
                	{
						if (_connections == null)
						{
							_connections = new Dictionary<String, ConnectionProvider>();
		
							// add a connection provider for each configured connection string
							foreach ( ConnectionStringSettings conn in ConnectionStrings )
							{
								_connections.Add(conn.Name, new ConnectionProvider(conn.Name, conn.ConnectionString));
							}
						}
					}
				}

				return _connections;
			}
		}

		/// <summary>
		/// Adds the specified connection string to the map of connection strings.
		/// </summary>
		/// <param name="connectionStringName">The connection string name.</param>
		/// <param name="connectionString">The provider specific connection information.</param>
		public static void AddConnection(String connectionStringName, String connectionString)
		{
			lock (SyncRoot)
            {
				Connections.Remove(connectionStringName);
				ConnectionProvider connection = new ConnectionProvider(connectionStringName, connectionString);
				Connections.Add(connectionStringName, connection);
			}
		}

		/// <summary>
		/// Provides ability to switch connection string at runtime.
		/// </summary>
		public sealed class ConnectionProvider
		{
			private NetTiersProvider _provider;
			private NetTiersProviderCollection _providers;
			private String _connectionStringName;
			private String _connectionString;


			/// <summary>
			/// Initializes a new instance of the ConnectionProvider class.
			/// </summary>
			/// <param name="connectionStringName">The connection string name.</param>
			/// <param name="connectionString">The provider specific connection information.</param>
			public ConnectionProvider(String connectionStringName, String connectionString)
			{
				_connectionString = connectionString;
				_connectionStringName = connectionStringName;
			}

			/// <summary>
			/// Gets the provider.
			/// </summary>
			public NetTiersProvider Provider
			{
				get { LoadProviders(); return _provider; }
			}

			/// <summary>
			/// Gets the provider collection.
			/// </summary>
			public NetTiersProviderCollection Providers
			{
				get { LoadProviders(); return _providers; }
			}

			/// <summary>
			/// Instantiates the configured providers based on the supplied connection string.
			/// </summary>
			private void LoadProviders()
			{
				DataRepository.LoadProviders();

				// Avoid claiming lock if providers are already loaded
				if ( _providers == null )
				{
					lock ( SyncRoot )
					{
						// Do this again to make sure _provider is still null
						if ( _providers == null )
						{
							// apply connection information to each provider
							for ( int i = 0; i < NetTiersSection.Providers.Count; i++ )
							{
								NetTiersSection.Providers[i].Parameters["connectionStringName"] = _connectionStringName;
								// remove previous connection string, if any
								NetTiersSection.Providers[i].Parameters.Remove("connectionString");

								if ( !String.IsNullOrEmpty(_connectionString) )
								{
									NetTiersSection.Providers[i].Parameters["connectionString"] = _connectionString;
								}
							}

							// Load registered providers and point _provider to the default provider
							_providers = new NetTiersProviderCollection();

							ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
							_provider = _providers[NetTiersSection.DefaultProvider];
						}
					}
				}
			}
		}

		#endregion Connections

		#region Static properties
		
		#region RecursosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Recursos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static RecursosProviderBase RecursosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.RecursosProvider;
			}
		}
		
		#endregion
		
		#region PedidosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pedidos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PedidosProviderBase PedidosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PedidosProvider;
			}
		}
		
		#endregion
		
		#region TiposRecursosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="TiposRecursos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static TiposRecursosProviderBase TiposRecursosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.TiposRecursosProvider;
			}
		}
		
		#endregion
		
		#region LibrosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Libros"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static LibrosProviderBase LibrosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.LibrosProvider;
			}
		}
		
		#endregion
		
		#region UsuariosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Usuarios"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UsuariosProviderBase UsuariosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UsuariosProvider;
			}
		}
		
		#endregion
		
		#region UsuariosRecursosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UsuariosRecursos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UsuariosRecursosProviderBase UsuariosRecursosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UsuariosRecursosProvider;
			}
		}
		
		#endregion
		
		#region ProveedoresProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Proveedores"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProveedoresProviderBase ProveedoresProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProveedoresProvider;
			}
		}
		
		#endregion
		
		#region ClientesProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Clientes"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ClientesProviderBase ClientesProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ClientesProvider;
			}
		}
		
		#endregion
		
		#region CiudadesProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Ciudades"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static CiudadesProviderBase CiudadesProvider
		{
			get 
			{
				LoadProviders();
				return _provider.CiudadesProvider;
			}
		}
		
		#endregion
		
		#region CatalogoProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Catalogo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static CatalogoProviderBase CatalogoProvider
		{
			get 
			{
				LoadProviders();
				return _provider.CatalogoProvider;
			}
		}
		
		#endregion
		
		#region DetallePedidosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="DetallePedidos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static DetallePedidosProviderBase DetallePedidosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.DetallePedidosProvider;
			}
		}
		
		#endregion
		
		#region HistoricoPedidosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="HistoricoPedidos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static HistoricoPedidosProviderBase HistoricoPedidosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.HistoricoPedidosProvider;
			}
		}
		
		#endregion
		
		#region HistoricoDetallePedidosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="HistoricoDetallePedidos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static HistoricoDetallePedidosProviderBase HistoricoDetallePedidosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.HistoricoDetallePedidosProvider;
			}
		}
		
		#endregion
		
		#region EstadoPedidosProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="EstadoPedidos"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static EstadoPedidosProviderBase EstadoPedidosProvider
		{
			get 
			{
				LoadProviders();
				return _provider.EstadoPedidosProvider;
			}
		}
		
		#endregion
		
		
		#region MenusAccesiblesProvider
		
		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="MenusAccesibles"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static MenusAccesiblesProviderBase MenusAccesiblesProvider
		{
			get 
			{
				LoadProviders();
				return _provider.MenusAccesiblesProvider;
			}
		}
		
		#endregion
		
		#endregion
	}
	
	#region Query/Filters
		
	#region RecursosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Recursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class RecursosFilters : RecursosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the RecursosFilters class.
		/// </summary>
		public RecursosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the RecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public RecursosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the RecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public RecursosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion RecursosFilters
	
	#region RecursosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="RecursosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Recursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class RecursosQuery : RecursosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the RecursosQuery class.
		/// </summary>
		public RecursosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the RecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public RecursosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the RecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public RecursosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion RecursosQuery
		
	#region PedidosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PedidosFilters : PedidosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PedidosFilters class.
		/// </summary>
		public PedidosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PedidosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PedidosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PedidosFilters
	
	#region PedidosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PedidosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PedidosQuery : PedidosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PedidosQuery class.
		/// </summary>
		public PedidosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PedidosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PedidosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PedidosQuery
		
	#region TiposRecursosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="TiposRecursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TiposRecursosFilters : TiposRecursosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TiposRecursosFilters class.
		/// </summary>
		public TiposRecursosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the TiposRecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TiposRecursosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TiposRecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TiposRecursosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TiposRecursosFilters
	
	#region TiposRecursosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="TiposRecursosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="TiposRecursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TiposRecursosQuery : TiposRecursosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TiposRecursosQuery class.
		/// </summary>
		public TiposRecursosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the TiposRecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TiposRecursosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TiposRecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TiposRecursosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TiposRecursosQuery
		
	#region LibrosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Libros"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LibrosFilters : LibrosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LibrosFilters class.
		/// </summary>
		public LibrosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the LibrosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LibrosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LibrosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LibrosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LibrosFilters
	
	#region LibrosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="LibrosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Libros"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LibrosQuery : LibrosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LibrosQuery class.
		/// </summary>
		public LibrosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the LibrosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LibrosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LibrosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LibrosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LibrosQuery
		
	#region UsuariosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Usuarios"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UsuariosFilters : UsuariosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UsuariosFilters class.
		/// </summary>
		public UsuariosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UsuariosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UsuariosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UsuariosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UsuariosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UsuariosFilters
	
	#region UsuariosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UsuariosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Usuarios"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UsuariosQuery : UsuariosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UsuariosQuery class.
		/// </summary>
		public UsuariosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UsuariosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UsuariosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UsuariosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UsuariosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UsuariosQuery
		
	#region UsuariosRecursosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UsuariosRecursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UsuariosRecursosFilters : UsuariosRecursosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosFilters class.
		/// </summary>
		public UsuariosRecursosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UsuariosRecursosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UsuariosRecursosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UsuariosRecursosFilters
	
	#region UsuariosRecursosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UsuariosRecursosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UsuariosRecursos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UsuariosRecursosQuery : UsuariosRecursosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosQuery class.
		/// </summary>
		public UsuariosRecursosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UsuariosRecursosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UsuariosRecursosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UsuariosRecursosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UsuariosRecursosQuery
		
	#region ProveedoresFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Proveedores"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProveedoresFilters : ProveedoresFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProveedoresFilters class.
		/// </summary>
		public ProveedoresFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProveedoresFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProveedoresFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProveedoresFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProveedoresFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProveedoresFilters
	
	#region ProveedoresQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProveedoresParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Proveedores"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProveedoresQuery : ProveedoresParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProveedoresQuery class.
		/// </summary>
		public ProveedoresQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProveedoresQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProveedoresQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProveedoresQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProveedoresQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProveedoresQuery
		
	#region ClientesFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Clientes"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClientesFilters : ClientesFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClientesFilters class.
		/// </summary>
		public ClientesFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClientesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClientesFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClientesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClientesFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClientesFilters
	
	#region ClientesQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ClientesParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Clientes"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClientesQuery : ClientesParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClientesQuery class.
		/// </summary>
		public ClientesQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClientesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClientesQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClientesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClientesQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClientesQuery
		
	#region CiudadesFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Ciudades"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CiudadesFilters : CiudadesFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CiudadesFilters class.
		/// </summary>
		public CiudadesFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the CiudadesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CiudadesFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CiudadesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CiudadesFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CiudadesFilters
	
	#region CiudadesQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="CiudadesParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Ciudades"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CiudadesQuery : CiudadesParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CiudadesQuery class.
		/// </summary>
		public CiudadesQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the CiudadesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CiudadesQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CiudadesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CiudadesQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CiudadesQuery
		
	#region CatalogoFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Catalogo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CatalogoFilters : CatalogoFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CatalogoFilters class.
		/// </summary>
		public CatalogoFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the CatalogoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CatalogoFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CatalogoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CatalogoFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CatalogoFilters
	
	#region CatalogoQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="CatalogoParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Catalogo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CatalogoQuery : CatalogoParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CatalogoQuery class.
		/// </summary>
		public CatalogoQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the CatalogoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CatalogoQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CatalogoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CatalogoQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CatalogoQuery
		
	#region DetallePedidosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DetallePedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetallePedidosFilters : DetallePedidosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetallePedidosFilters class.
		/// </summary>
		public DetallePedidosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetallePedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetallePedidosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetallePedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetallePedidosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetallePedidosFilters
	
	#region DetallePedidosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="DetallePedidosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="DetallePedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetallePedidosQuery : DetallePedidosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetallePedidosQuery class.
		/// </summary>
		public DetallePedidosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetallePedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetallePedidosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetallePedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetallePedidosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetallePedidosQuery
		
	#region HistoricoPedidosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="HistoricoPedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class HistoricoPedidosFilters : HistoricoPedidosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosFilters class.
		/// </summary>
		public HistoricoPedidosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public HistoricoPedidosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public HistoricoPedidosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion HistoricoPedidosFilters
	
	#region HistoricoPedidosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="HistoricoPedidosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="HistoricoPedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class HistoricoPedidosQuery : HistoricoPedidosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosQuery class.
		/// </summary>
		public HistoricoPedidosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public HistoricoPedidosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the HistoricoPedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public HistoricoPedidosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion HistoricoPedidosQuery
		
	#region HistoricoDetallePedidosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="HistoricoDetallePedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class HistoricoDetallePedidosFilters : HistoricoDetallePedidosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosFilters class.
		/// </summary>
		public HistoricoDetallePedidosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public HistoricoDetallePedidosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public HistoricoDetallePedidosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion HistoricoDetallePedidosFilters
	
	#region HistoricoDetallePedidosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="HistoricoDetallePedidosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="HistoricoDetallePedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class HistoricoDetallePedidosQuery : HistoricoDetallePedidosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosQuery class.
		/// </summary>
		public HistoricoDetallePedidosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public HistoricoDetallePedidosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the HistoricoDetallePedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public HistoricoDetallePedidosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion HistoricoDetallePedidosQuery
		
	#region EstadoPedidosFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="EstadoPedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class EstadoPedidosFilters : EstadoPedidosFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosFilters class.
		/// </summary>
		public EstadoPedidosFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public EstadoPedidosFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public EstadoPedidosFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion EstadoPedidosFilters
	
	#region EstadoPedidosQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="EstadoPedidosParameterBuilder"/> class
	/// that is used exclusively with a <see cref="EstadoPedidos"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class EstadoPedidosQuery : EstadoPedidosParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosQuery class.
		/// </summary>
		public EstadoPedidosQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public EstadoPedidosQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the EstadoPedidosQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public EstadoPedidosQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion EstadoPedidosQuery
		
	#region MenusAccesiblesFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="MenusAccesibles"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class MenusAccesiblesFilters : MenusAccesiblesFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesFilters class.
		/// </summary>
		public MenusAccesiblesFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public MenusAccesiblesFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public MenusAccesiblesFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion MenusAccesiblesFilters
	
	#region MenusAccesiblesQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="MenusAccesiblesParameterBuilder"/> class
	/// that is used exclusively with a <see cref="MenusAccesibles"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class MenusAccesiblesQuery : MenusAccesiblesParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesQuery class.
		/// </summary>
		public MenusAccesiblesQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public MenusAccesiblesQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the MenusAccesiblesQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public MenusAccesiblesQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion MenusAccesiblesQuery
	#endregion

	
}
